package com.shenmazong.servereduresume.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shenmazong.servereduresume.dto.TbInformation;
import com.shenmazong.servereduresume.service.TbInformationService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("information")
public class TbInformationController  {
    @Autowired
    private TbInformationService tbInformationService;

    @PostMapping("findByUserIdInformationId")
    public ResultResponse findByUserIdInformationId(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbInformationService.findByUserIdInformationId(batchChooseIdVo);
    }
    @PostMapping("saveInformation")
    public ResultResponse saveInformation(@RequestBody TbInformation tbInformation){
        return tbInformationService.saveInformation(tbInformation);
    }
    @PostMapping("updateInformation")
    public ResultResponse updateInformation(@RequestBody TbInformation tbInformation){
        return tbInformationService.updateInformation(tbInformation);
    }
    @PostMapping("deleteInformation")
    public ResultResponse deleteInformation(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbInformationService.deleteInformation(batchChooseIdVo);
    }
}
